package zl.osimall.common.service;

import com.github.pagehelper.PageInfo;
import zl.osimall.common.bean.Order;
import zl.osimall.common.bean.OrderChart;
import zl.osimall.common.bean.OrderDetail;
import zl.osimall.common.exception.SteduException;

import java.util.List;

public interface OrderService {
    public void add(Order order, Integer[] cartId) throws SteduException;

    //生成订单，一个传一个商品的集合，然后生成UUID，再将两个表都添加

    public PageInfo<Order> selectByPage(Order condition ,Integer pageNum , Integer pageSize);

    public List<OrderDetail> selectByOrder(String id) throws SteduException;

    public Boolean update(Order order) throws SteduException;

    public Order selectById(String id) throws SteduException;

    public void pay(String orderId, Integer userId, String paypwd) throws SteduException;

    public List<Order> selectByUserId(Integer userId);

    public List<OrderChart> selectByStatus();

}
